import React, { Component } from 'react';
import { View } from "@tarojs/components";
import { Icon } from '@/components/Icon';
import {Location,reverseGeocoder} from '@/utils/common/lbs'
import "./index.scss";


export default class AppHeader extends Component {
  static options = {
    addGlobalClass: true
  };

  state = {
    address:''
  };

  componentWillMount() {

  }

  render() {
    const {address}=this.state
    return (
      <View
        className='app-search'
      >
        <View className="location">
          <Icon value='map-pin' size='18' color='#fff'></Icon>
            {address}
          <Icon value='chevron-right' size='18' color='#fff'></Icon>
        </View>
        <View className="search-wrap" onClick={()=>{Taro.navigateTo({url:'/pages/search/index'})}}>
          <View className="search-input">
          </View>
          <View className="search-txt">
            <Icon className="btn" value='search' size='20' color='#fff'></Icon>
            <View className="txt">搜索</View>
          </View>
        </View>
      </View>
    );
  }
}
